define(['jquery', 'bootstrap', 'frontend', 'form', 'table', 'template', 'vue.min'], function ($, undefined, Frontend, Form, Table, Template, Vue) {
    var validatoroptions = {
        invalid: function (form, errors) {
            $.each(errors, function (i, j) {
                Layer.msg(j);
            });
        }
    };
    var Controller = {
        index: function () {
            console.log("sdf33");
            var vm = new Vue({
                el : "#app",
                data : {
                    counter: 0,
                    name : "vue"
                },
                methods:{
                    greet : function (str, e) {
                        alert(str);
                        console.log(e);
                    }
                }
            });
        },
        jc: function () {

        },
        api: {
            bindevent: function () {
                Form.api.bindevent($("form[role=form]"), function (data, ret) {
                    //console.log(ret);
                    setTimeout(function () {
                        location.href = ret.url ? ret.url : "/";
                    }, 1000);
                });
            }
        }
    };
    return Controller;
});